﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RCloud.Data.List
{
    public class MovieTagClass : Doo.DataClass.ListClass<REntities, MovieTags>
    {
        public int MinSumCount
        {
            get;
            set;
        }

        public override IOrderedQueryable<MovieTags> GetQuery(REntities container)
        {
            if (MinSumCount == 0) MinSumCount = 200;
            var query = from rh in container.MovieTags
                        where rh.SumCount >= MinSumCount
                        orderby rh.RowID
                        select rh;
            return query;
        }
    }

    public class MovieGenresClass : Doo.DataClass.ListClass<REntities, MovieGenres>
    {

        public override IOrderedQueryable<MovieGenres> GetQuery(REntities container)
        {
            var query = from rh in container.MovieGenres
                        orderby rh.RowID
                        select rh;
            return query;
        }
    }
}
